1. Field of the Invention
The present invention relates to information communication and processing. More particularly, the present invention relates to a system and method for transitioning from a logical state to any other logical state by modifying a single state element.
2. Background Information
In modern electronic devices, it is often necessary to transfer data between circuits in different digital clock domains. In other words, each circuit may make use of a distinct clock signal to trigger operations in the respective circuit. With different clock domains, the synchronization of data transferred over a bus between the two clock domains becomes problematic. The solution of simply synchronizing all of the information is insufficient. Several bits might change at a single cycle, such as, for example, transitioning from 7 (0111) to 8 (1000). Due to different signal delays, different propagation timings, and the like, a bad temporary value can be spuriously and transiently sampled (e.g., 6 (0110), 14 (1110) and/or 10 (1010)), resulting in incorrect readings.
A partial solution to the problem can be to ensure that only one bit changes between two contiguous logical states, such as, for example, by using a Gray code. A Gray code is an ordering of 2N binary numbers such that only one bit changes from one entry to the next. Gray codes are disclosed in U.S. Pat. No. 2,632,058 to Frank Gray. However, Gray codes can only handle transitions between two contiguous logical states. For a counter, this is equivalent to a move of +1, −1 or 0. Using the example of a Gray code for two bits, if logical state A is represented as 00, logical state B as 01, logical state C as 11, and logical state D as 10, then transitions from A to B to C to D to A are supported, as only one bit is changed during each contiguous transition. However, a single transition from A to C or from B to D is not supported, as each such transition requires more than one bit to change in one cycle.
Several conventional handshake protocols can also be used to address the issue of synchronization of data transfer and allow multiple bits to be changed. However, these handshake protocols do not transfer multiple bits at every cycle, and generally require several cycles for every data transfer. In addition, these handshake protocols fail to address other issues, such as free-running state machines and counters that can be incremented or decremented by any value. Thus, synchronizing data transfers using these handshake protocols on a free-running interface without an additional delay becomes problematic.
Transferring several bits over a bus every cycle may be done with a Gray code, assuming that only a single bit is changed at every cycle. Thus, the sample side can load a new value at every cycle. However, as discussed previously, the conventional implementation of Gray codes is limited to two moves from each state (i.e., a move from a given state to one of the two states that are contiguous to the given state). Gray codes do not support a transition from the given state to another state that is not contiguous to the given state.